<template>
  <div>
    <div class="group-default">
      <b-button type="primary" round @click="buttonClick">显示默认对话框</b-button>
      <modal :show.sync="show" z-index="22" />
    </div>
    <div class="group">
        <b-button type="primary" round @click="buttonClick">显示自定义对话框</b-button>
      <modal :show.sync="show" z-index="22" title="请选择您喜欢的运动" height="300px">
          <div class="sports">
              <ul>
                  <li><input type="checkbox" name="" id="">足球</li>
                  <li><input type="checkbox" name="" id="">篮球</li>
                  <li><input type="checkbox" name="" id="">羽毛球</li>
                  <li><input type="checkbox" name="" id="">乒乓球</li>
                  <li><input type="checkbox" name="" id="">游泳</li>
              </ul>
          </div>
      </modal>
    </div>

    <div class="box">
      <b-button type="primary" @click="globalClick">全局对话框</b-button>
    </div>
  </div>
</template>
<script>
export default {
  name: "Model",
  props: {
    visible: {
      type: Boolean,
      default: true,
    },
  },
  data() {
    return {
      show: false,
    };
  },
  methods: {
    buttonClick() {
      this.show = true;
    },
    globalClick(){
      
    }
  },
};
</script>
<style scoped>
.group-default {
  padding: 20px 0px;
}
.group{
    padding: 20px 0px;
}
.sports ul{
list-style-type: none;
}
.sports ul li input{
    margin-right: 10px;
}
</style>